package org.xg.study.pd;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author CMG
 * @version 1.0
 * @className EngineController
 * @description
 * @date 2021/9/14 21:09
 **/
public class EngineController {
    private Logger logger = LoggerFactory.getLogger(EngineController.class);

    public String process(final String userId, final String userSex,
                          final int userAge) {
        logger.info("if else实现方式判断用户结果：userId: {}, userSex: {}, userAge: {}",
                userId, userSex, userAge);
        if("man".equals(userSex)){
            if(userAge < 25){
                return "果实A";
            }
            if(userAge >= 25){
                return "果实B";
            }
        }
        if("woman".equals(userSex)){
            if(userAge < 25){
                return "果实C";
            }
            if(userAge >= 25){
                return "果实D";
            }
        }
        return null;
    }
}
